To assign queries to facts in the rule base you must use the "fact" keyword. This keyword should appear after the "global" statement if globals are used. Otherwise, it should be the first keyword in the rule base. You then enter the facts followed by their queries. The queries may be simple or quoted strings and facts must be separated by commas (fact names must be in quotes if they contain spaces or special characters or if they match keywords). The syntax is as follows:
When the system needs a fact, it will display the query string in the query field on the "tutorial shell" card.
The fact declaration section also allows you to control the order of queries while the system is forward chaining. Facts that will not result in a user query (facts set only by rules or daemons) should not appear in the fact declaration section.
For example, if you wanted the inference engine to examine facts "a", "b", "c", and "the thing" in the order "a", "c", "the thing", and "b" you would declare the facts as follows:
fact a "ask about a",
c "ask about c",
"the thing" "ask about the thing",
b "ask about b"
In the above example, the forward chaining inference engine would first ask the user about fact "a", then "c", then "the thing", and finally, "b" if it did not already know the state of these facts. Fact declarations do not affect the order of queries when backward chaining.
Fact identifiers follow the conventions for HyperCard card identifiers. Identifiers may contain spaces or special characters or they may match keywords if they are enclosed in quotation marks. You may also enclose fact names without spaces or special characters in quotation marks, but it is not necessary unless the name matches one of the keywords. Fact identifiers may not match global names.